<?php
/**
 * Created by PhpStorm.
 * User: yangjiaming
 * Date: 2018/2/5
 * Time: 15:24
 */

namespace Eagle\Service;


class Base
{
    public function setParam($key, $type, $value, &$param) {
        if($type == 'in') {
            if(empty($value)) {
                $value = array('0');
            }
        }
        $param[$key] = array(
            'operation' => $type,
            'value' => $value
        );
        if(empty($value) && $value!=0 ) unset($param[$key]);//如果参数为空、去除参数

    }
}